﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthReport.aspx.cs" Inherits="CardLogistics.Web.MainPage.CardArrival.StorageCheck.MonthReport" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="../../../Controls/WebUserControl_Nav.ascx" TagName="WebUserControl_Nav"
    TagPrefix="uc1" %>
<%@ Register Src="../../../Controls/WebUserControl_ToolBar.ascx" TagName="WebUserControl_ToolBar"
    TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>白卡统计月报表</title>
       <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/selPage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../../js/jquery.js"></script>
    <script src="../../../js/jquery.tipswindow.2.0.js" type="text/javascript"></script>
    <script src="../../../js/valReq.js" type="text/javascript"></script>
    <script src="../../../js/CreateControl.js" type="text/javascript"></script>
    <script src="../../../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">

        //搜索按钮执行函数
        function queryData() {
            var ReportViewer = document.getElementById("ReportViewer");
            var month = $("#txt_Month").val(); //月份
            ReportViewer.Stop();

            var DataURL = encodeURI("MonthReportRpt.aspx?month=" + month);
            ReportViewer.DataURL = DataURL;

            //格式化月份
            var date = month.substr(0,4)+'年'+ month.substr(5,2)+'月';

            //给报表设计器赋值参数
            if (date == '年月') {
                ReportViewer.Report.ControlByName("Month").AsMemoBox.Text = "白卡入库卡片汇总表";
            }else
                ReportViewer.Report.ControlByName("Month").AsMemoBox.Text = date + "白卡入库卡片汇总表";

            ReportViewer.Start();
        }
    </script>
</head>
<body onload="queryData();">
    <form runat="server" id="f2">
    <uc1:WebUserControl_Nav ID="WebUserControl_Nav1" runat="server" />
    <div class="rightinfo">
        <ul class="seachform">
            <li>
                <label>
                    年月</label>
                <asp:TextBox ID="txt_Month" runat="server" CssClass="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM'})"
                    Width="100px"></asp:TextBox>
            </li>
            <li>
                <label>
                    &nbsp;</label>
                <input id="btnSearch" type="button" class="scbtn" value="查询" onclick="queryData();" />
            </li>
        </ul>
        <script type="text/javascript">
            var divkuangH = $(window).height();
            var viewH = divkuangH - 117 + 20 - 1;
            CreatePrintViewerEx("100%", viewH, '../../../grf/MonthReport.grf', "", false);
        </script>
    </div>
    </form>
</body>
</html>
